﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class edituser : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Session["username"] == null)
            {
                Response.Redirect("default.aspx");
            }
        }
        userIpt.Text = Request.QueryString["username"].ToString();
        userIpt.Enabled = false;
        NVR.BLL.UserInfo user = new NVR.BLL.UserInfo();
        NVR.Entity.userInfo userInfo = new NVR.Entity.userInfo();
        userInfo = user.GetUserInfo(userIpt.Text);
        if (userInfo != null)
        {
            telIpt.Text = userInfo.tel;
            qqIpt.Text = userInfo.qq;
            emailIpt.Text = userInfo.email;
        }
            /*NVR.BLL.NVRDevInfo nvr = new NVR.BLL.NVRDevInfo();
            NVR.Entity.NVRDeviceInfo nvrInfo = new NVR.Entity.NVRDeviceInfo();
            nvrInfo = nvr.GetNVRInfoBySn(snIpt.Text);
            if (nvrInfo != null)
            {
                nvrAdminIpt.Text = nvrInfo.deviceAdmin;
                nvrPwdIpt.Text = nvrInfo.devicePwd;
                nvrCfmPwdIpt.Text = nvrInfo.devicePwd;
                nvrUserIpt.Text = nvrInfo.username;
                nvrLocIpt.Text = nvrInfo.deviceLoc;
            }*/
    }
}